#ifndef LEGENDMODEL_H
#define LEGENDMODEL_H

#include <QAbstractListModel>
#include <QVector>
#include <QStringList>

class LegendModel : public QAbstractListModel
{
Q_OBJECT
public:
    explicit LegendModel(const QStringList &legend, QObject *parent = 0);
    int rowCount(const QModelIndex &parent = QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role);
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    Qt::ItemFlags flags(const QModelIndex &index) const;
    bool removeCurve(int row);

    QStringList stringList() const;

private:
    QStringList _legend;

};

#endif // LEGENDMODEL_H
